<fieldset>
  <legend>添加属性</legend>
    <a href="<?php echo Url::generate('UserAttrConf', 'Create') ?>">添加新属性</a>
</fieldset>
<fieldset>
	<legend>已有属性</legend>
	<form method="post" action="<?php echo Url::generate($this->context->uri['module'], 'DoBatchEdit') ?>">
		<table>
		  <tr>
		    <th>属性名</th>
		    <th>顺序</th>
		    <th>对读者隐藏</th>
		    <th>禁用</th>
		    <th>表单元素类型</th>
		    <th>创建时间</th>
		    <th>最后修改</th>
		    <th>操作</th>
		 <tr>
		<?php
		foreach ($this->userAttrConfs as $attrConf)
		{
		?>
		  <tr>
		    <td><input name="conf[<?php echo $attrConf['id'] ?>][caption]" type="text" value="<?php echo $attrConf['caption'] ?>" /></td>
		    <td><input name="conf[<?php echo $attrConf['id'] ?>][display_order]" type="text" size="4" value="<?php echo $attrConf['display_order'] ?>" /></td>
		    <td><input name="conf[<?php echo $attrConf['id'] ?>][hidden_for_reader]" type="checkbox" value="1" <?php echo 1 == $attrConf['hidden_for_reader'] ? 'checked="checked"' : '' ?> /></td>
		    <td><input name="conf[<?php echo $attrConf['id'] ?>][disabled]" type="checkbox" value="1" <?php echo 1 == $attrConf['disabled'] ? 'checked="checked"' : '' ?> /></td>
		    <td><?php echo $attrConf['form_item_type'] ?></td>
		    <td><?php echo date('y-m-d H:i', $attrConf['created']) ?></td>
		    <td><?php echo date('y-m-d H:i', $attrConf['modified']) ?></td>
		    <td><a href="<?php echo Url::generate('UserAttrConf', 'Edit', array('id' => $attrConf['id'])) ?>">修改</a></td>
		  </tr>
		<?php
		}
		?>
		</table>
		<input type="submit" class="submit" value="批量更新" />
	</form>
</fieldset>
